/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package factory;

import Model.Dame;
import Model.Piece;
import Model.Pion;

/**
 * Factory pour contruire des pieces
 * @author goum
 */
public class PieceFactory {

    public static Piece getPiece(String type, String couleur) {
        Piece piece;
        if (type.compareTo("dame") == 0) {
            piece = new Dame(couleur);
        } else {
            piece = new Pion(couleur);
        }
        return piece;
    }
}
